﻿using System;

namespace Microsoft.Popfly.GameCreator.GameEngine
{
    public class CollisionEdges
    {
        public enum EdgesType { CIRCLE, RECT };
        public double Width 
        {
            get { return m_width; }
            private set
            {
                if (value > Height)
                {
                    Radius = value / 2;
                }
                m_width = value;
            } 
        }
        private double m_width;
        
        public double Height 
        {
            get { return m_height; }
            private set
            {
                if (value > Width)
                {
                    Radius = value / 2;
                }
                m_height = value;
            }
        }
        private double m_height;

        public double Radius { get; private set; }
        public EdgesType Type;

        public CollisionEdges(double width, double height, EdgesType type)
        {
            Type = type;
            Width = width;
            Height = height;
        }
    }
}
